package com.wang.ymcc.feignclient;

import com.wang.lwm.result.JSONResult;
import com.wang.ymcc.CourseDoc;
import com.wang.ymcc.domain.Course;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;


@FeignClient(value = "service-search",fallback = SearchControllerFallBack.class)
public interface EsSearchServerFeign {
    @PostMapping("/search/save")
    public JSONResult save(@RequestBody CourseDoc doc);

    @PostMapping(value = "/search/delete")
    public JSONResult delete(@RequestBody Course course);
}
